package com.cloud.shopping.druid.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloud.shopping.druid.model.HotGoods;
import com.cloud.shopping.druid.util.DruidPage;

import java.util.List;
import java.util.Map;

/**
 * @author John.Zhang
 * @version Id: HotGoodsService, v 0.1 2021/2/8 9:57 ZhiYong Exp $
 */
public interface HotGoodsService extends IService<HotGoods> {

    /**
     * 时间查询+排除
     * @param size size
     * @param hour hour
     * @param urls urls
     * @param max max
     * @return List
     */
    List<Map<String,String>> searchHotGoods(Integer size, Integer hour, String[] urls, Integer max);

    /**
     * 时间查询+排除
     * @param size size
     * @param hour hour
     * @param urls urls
     * @return List
     */
    List<HotGoods> search(Integer size, Integer hour, String[] urls);

    /**
     * 时间查询
     * @param size size
     * @param hour hour
     * @return List
     */
    List<HotGoods> search(Integer size,Integer hour);

    /**
     * 分页查询+排序
     * @param size size
     * @param page page
     * @param sort sort
     * @param sortType sortType
     * @return DruidPage
     */
    DruidPage<List<HotGoods>> pageListSort(Integer size, Integer page, String sort, String sortType);

    /**
     * 分页查询
     * @param size size
     * @param page page
     * @return DruidPage
     */
    DruidPage<List<HotGoods>> pageList(Integer size,Integer page);


    /**
     * 前N条
     * @param size size
     * @return List
     */
    List<HotGoods> topNum(Integer size);

}
